home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
- Begin VB.Form frmDOMHTML
- BackColor = &H00FFFFFF&
- Caption = "DOM HTML"
- ClientHeight = 4215
- ClientLeft = 60
- ClientTop = 630
- ClientWidth = 5910
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 4215
- ScaleWidth = 5910
- Visible = 0 'False
- Begin RichTextLib.RichTextBox rtf
- Height = 735
- Left = 600
- TabIndex = 0
- Top = 300
- Width = 1515
- _ExtentX = 2672
- _ExtentY = 1296
- _Version = 393217
- BorderStyle = 0
- ScrollBars = 3
- Appearance = 0
- TextRTF = $"DOMHTML.frx":0000
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Verdana"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Menu mnuFileMenu
- Caption = "&File"
- Begin VB.Menu mnuFileClose
- Caption = "Close"
- End
- End
- Attribute VB_Name = "frmDOMHTML"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- ' DOMHTML.frm July 1999 contact markb@orionstudios.com
- ' Displays document HTML in a RichTextBox (a TextBox has limited capacity)
- ' Requires Project/References entry for
- ' Microsoft HTML Object Library (MSHTML.tlb)
- '====================================================================================
- Private Const MARGIN = 90 ' Twips
- Public Sub DisplayHTML(HTMLDoc As MSHTML.HTMLDocument)
- On Error GoTo DisplayHTML_Error
- Dim oHTML As MSHTML.HTMLHtmlElement
- With HTMLDoc
- Me.Caption = .Title
- Set oHTML = .getElementsByTagName("HTML")(0)
- End With
- rtf = oHTML.outerHTML
- DisplayHTML_Exit:
- rtf.Visible = True
- Exit Sub
- DisplayHTML_Error:
- rtf = "ERROR: " & Err.Number & " - " & Err.Description
- Resume DisplayHTML_Exit
- End Sub
- Private Sub Form_Resize()
- On Error Resume Next
- rtf.Move MARGIN, 0, Me.ScaleWidth - MARGIN, Me.ScaleHeight
- End Sub
- Private Sub mnuFileClose_Click()
- Unload Me
- End Sub
-